Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

globalStylesheets config option #1597

Merged
merged 9 commits into from
Aug 22, 2024
Merged

globalStylesheets config option #1597

merged 9 commits into from
Aug 22, 2024

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Aug 22, 2024

Alternative to #1589 and #1595. Adds a globalStylesheets option to the config which specifies a set of stylesheets to add to all pages (in addition to the style option which can be specified either globally or on a specific page). By default it’s Source Serif Pro 4 from Google Fonts. Also adds a little heuristic to add the preconnect for Google Fonts if a Google Fonts stylesheet is detected. Related #423.

@mbostock
Copy link
Member Author

Also tacked on an upgrade to Source Serif 4 that @Fil noticed…

@mbostock mbostock enabled auto-merge (squash) August 22, 2024 03:12
@mbostock mbostock changed the title defaultStylesheets config option globalStylesheets config option Aug 22, 2024
@Fil Fil disabled auto-merge August 22, 2024 06:21
Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think this is the right call 😅

src/style/global.css Outdated Show resolved Hide resolved
src/config.ts Outdated Show resolved Hide resolved
@Fil
Copy link
Contributor

Fil commented Aug 22, 2024

I've added a bit of documentation

@Fil Fil self-requested a review August 22, 2024 12:42
@mbostock mbostock enabled auto-merge (squash) August 22, 2024 13:24
@mbostock mbostock merged commit 86e30a8 into main Aug 22, 2024
4 checks passed
@mbostock mbostock deleted the mbostock/config-stylesheets branch August 22, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants